<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"%>

<div id="tradeinfo" class="tradeinfo" align="center">
				  Total de atividade do mercado: $<fmt:formatNumber type="NUMBER" minFractionDigits="2" maxFractionDigits="2" value="${userTradeInfo.totalPrice}"/>
				  
</div>
<div id="trade" class="trade">
		
<h2>Adicionar</h2>
				<c:forEach var="tradeitem" items="${userTradeInfo.listOfSumOfAnswersTrades}">
						<div id="tradeContent" class="answer">
							<div class="answertitle">
							
								<c:set var="var" value="${tradeitem.marketAnswerId}" scope="request"/>
								<h3>${answersMap[var]} - ${tradeitem.totalMerks} merks -
							
								 $<fmt:formatNumber type="NUMBER" minFractionDigits="2" maxFractionDigits="2" value="${tradeitem.answerTotalPrice}"/>(
								 
							 <c:choose>
							      <c:when test="${tradeitem.tendency == 1}">
							    	<font color="green">
							      </c:when>
							      <c:otherwise>
							      <font color="red">
							      </c:otherwise>
						      </c:choose>
								  $<fmt:formatNumber type="NUMBER" minFractionDigits="2" maxFractionDigits="2" value="${tradeitem.diferenceAnswerTotalPrice}"/>
								 </font>)</h3>
							</div>
							<div class="answeroption">
									<a id="option" class="optionsellselected" href="/trade/calculate/sell/${tradeitem.marketId}/${tradeitem.marketAnswerId}">Vender</a>
							</div>
						</div>
				</c:forEach>
</div>